<div class="box hide">
    <div class="listen_share">
        <ul>
            <li class="j-share-download hide">
                <a href="javascript:void(0)" download="mp3" style="display: block;">
                    <img src="images/listen_download.png" alt="">
                    <span>下载</span>
                </a>
            </li>
            <li class="j-share-singer">
                <img src="images/listener.png" alt="">
                <span>歌手</span>
            </li>
            <li class="j-share-mv">
                <img src="images/listen_mv.png" alt="">
                <span>MV</span>
            </li>
            <li class="sharing">
                <img src="images/listen_share.png" alt="">
                <span>分享</span>
            </li>
        </ul>
        <p class="add hide">
            <img class="j-add-to-player" src="images/listen_add.png" alt="">
            <span>添加到播放列表</span>
        </p>
        <p class="cancel">取消</p>
    </div>
</div>
<div class="share_box hide">
    <div class="share_con">
        <ul>
            <li class="share_item" data-id="1">
                <img src="images/listen_chat.png" alt="">
                <span>微信好友</span>
            </li>
            <li class="share_item" data-id="2">
                <img src="images/listen_friends.png" alt="">
                <span>朋友圈</span>
            </li>
            <li class="share_item hide" >
                <img src="images/listen_qq.png" alt="">
                <span>QQ好友</span>
            </li>
            <li class="share_item hide" >
                <img src="images/listen_wei.png" alt="">
                <span>微博</span>
            </li>
        </ul>
        <p class="share_cancel">取消</p>
    </div>
</div>
<script>
    $(function () {
        var height = window.innerHeight;
        $(".box,.share_box").height( height + "px" );
        // 关闭功能弹出框
        $(".cancel").click(function () {
            $(".box").addClass("hide");
        });
        // 关闭分享弹出框
        $(".share_cancel").click(function () {
            $(".share_box").addClass("hide");
        });

        $(".sharing").click(function () {
            $(".box").addClass("hide");
            $(".share_box").removeClass("hide");
        });
        $(".j-share-mv").click(function () {

            var singerId = $(this).attr("data-singerId");
            if(singerId){
                location.href = "singer_album.html?id="+singerId+"&mv=1";
            }else{
                $("#myTab").find("li").eq(1).find("a").trigger("click");
                $(".box").addClass("hide");
            }
        });
        $(".j-share-singer").click(function () {
            var singerId = $(this).attr("data-singerId");
            if(singerId){
                location.href = "singer_album.html?id="+singerId;
            }else{
                $("#myTab").find("li").eq(2).find("a").trigger("click");
                $(".box").addClass("hide");
            }
        });
        $(".j-share-download").click(function () {
//            var url = $(".j-add-to-player").attr("data-mp3");
//            if(url){
//                //window.open(url)
//            }
        });

    })
</script>